package com.chentongwei.spring.annotation.configuration;

import com.chentongwei.spring.annotation.configuration.entity.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author TongWei.Chen 2018-06-29 14:29:59
 * @Description:
 * @Project spring-annotation
 */
public class MainXmlTest {

    private static final String CONFIG = "classpath:configuration/beans.xml";

    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG);
        User user = applicationContext.getBean("user", User.class);
        System.out.println(user);
    }

}
